livecodefandomcom-20200223-history
Tree view widget
A widget to display array data in a tree view. Messages *'hiliteChanged': The hiliteChanged message is sent to the widget's script object when a row of the widget's display is clicked on, causing that row to be highlighted. Use the hilitedElement property to fetch the row's associated array keys. *'actionDoubleClick' pPath: The actionDoubleClick message is sent to the widget's script object when a row of the widget is double-clicked. The pPath parameter contains the path to the element whose row was clicked. *'actionInspect' pPath: The actionInspect message is sent to the widget's script object when the inspect icon is clicked on. The inspect icon appears when the value string of a particular array element contains a newline character, or if it is too large to fit in the space provided. The pPath parameter contains the path to the element whose icon was clicked *'dataChanged': The dataChanged message is sent to the widget's script object when the arrayData of the tree view changes. Properties *'alternateRowBackgrounds': Use the alternateRowBackgrounds property if you want to more clearly distinguish the rows displayed by the widget. it can be true or false. *'arrayData': The arrayData is the data currently being displayed by the tree view widget. Items can have values. For example this code: put empty into temp"Lunedì""Carlo" put empty into temp"Lunedì""Mario" put empty into temp"Martedì""Giovanna" put empty into temp"Martedì""Laura" set the sortType of widget 1 to "text" set the sortOrder of widget 1 to "ascending" set the arraydata of widget 1 to temp create this: but this code: put "$ 10" into temp"Lunedì""Carlo" put "$ 20" into temp"Lunedì""Mario" put "ristorante" into temp"Martedì""Giovanna" put "parco" into temp"Martedì""Laura" set the sortType of widget 1 to "text" set the showseparator of widget 1 to true set the sortOrder of widget 1 to "ascending" set the arraydata of widget 1 to temp create this: *'arrayStyle': Whether the tree view should display its contents in array style or as a standard tree view. It can be true or false. *'hilitedElement': Select the row corresponding to a comma delimited list of array keys. For example "key1,subkey2,subsubkey5". *'readOnly': It can be true or false. The readOnly property controls whether the widget presents the option to add elements to arrays or not. If false, the first row of the widget is always "Add new element", and when rows are hovered over, icons appear at the right to enable the removal of that element, or the addition of a new subelement. *'separatorRatio': It's a decimal number. It is the size of the first column as a ratio of the total view area. *ShowBorder *'showSeparator': It can be true or false. Use the showSeparator property to display the keys and values of the arrayData of the tree view widget in columns separated by a movable divide. *'SortOrder': Use the sortOrder property to display the elements of the tree view in ascending or descending order of the keys of its arrayData, given the current sortType. It can be "ascending" or "descending" *'sortType': It can be "numeric" (default) or "text". Category:Widgets Category:GUI